package com.diudiutechnology.www.yadiudiu.yadiudiu.mine.MyActivity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.diudiutechnology.www.yadiudiu.R;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/8/30.
 * 赚积分
 */

public class EarnPointsActivity extends Activity implements View.OnClickListener {
    @Bind(R.id.retur)
    LinearLayout retur;

    @Bind(R.id.check_layout)//签到
            RelativeLayout check_layout;
    @Bind(R.id.check)//签到
    TextView check;
    @Bind(R.id.platfor)//平台
    TextView platform;

    Context context;
    String eachcheckin ="0";//每次签到获取多少积分
    String getpoints="0";//一元钱等于多少积分
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_earn_points);
        ButterKnife.bind(this);
        context=this;
        initView();
    }

    private void initView() {
        retur.setOnClickListener(this);
        check_layout.setOnClickListener(this);
        if (getIntent()!=null){
            eachcheckin=getIntent().getStringExtra("eachcheckin");
            getpoints=getIntent().getStringExtra("getpoints");
        }
        check.setText("每次签到获取"+eachcheckin+"积分");
        platform.setText("每1元获取"+getpoints+"积分");
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.retur:
                finish();
                break;
            case R.id.check_layout://签到
                startActivity(new Intent(context ,SignIntegralActivity.class));
                break;



        }
    }
}

